package com.example.taximeter.bean;


import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.sql.Timestamp;

/**
 * 出租车
 */
public class CarInfo {

    @NotNull(message = "出租车id格式错误", groups =  GroupUpdate.class)
    private Integer id;//出租车id--主键

    @NotNull(message = "车牌号格式错误", groups = {GroupCreate.class, GroupUpdate.class})
    @NotEmpty(message = "车牌号不能为空", groups = {GroupCreate.class, GroupUpdate.class})
    @Length(min = 0, max = 100, message = "车牌号格式错误", groups = {GroupCreate.class, GroupUpdate.class})
    private String carno;//车牌号名称

//    @NotNull(message = "出租车公司id格式错误", groups =  GroupUpdate.class)
    private Integer companyid;//出租车公司id

//    @NotNull(message = "出租车公司名称格式错误", groups = {GroupCreate.class, GroupUpdate.class})
//    @NotEmpty(message = "出租车公司名称不能为空", groups = {GroupCreate.class, GroupUpdate.class})
    @Length(min = 0, max = 100, message = "出租车公司名称格式错误", groups = {GroupCreate.class, GroupUpdate.class})
    private String companyname;//出租车公司名称

    private Timestamp intime;//出租车公司id

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getCarno() {
        return carno;
    }

    public void setCarno(String carno) {
        this.carno = carno;
    }

    public Integer getCompanyid() {
        return companyid;
    }

    public void setCompanyid(Integer companyid) {
        this.companyid = companyid;
    }

    public String getCompanyname() {
        return companyname;
    }

    public void setCompanyname(String companyname) {
        this.companyname = companyname;
    }

    public Timestamp getIntime() {
        return intime;
    }

    public void setIntime(Timestamp intime) {
        this.intime = intime;
    }
}
